<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="centre/manage/include :: header">
</head>

<link rel="stylesheet" type="text/css" href="/css/plugins/layui/layui.css"/>
<link href="/css/jquery-select/jquery.searchableSelect.css" rel="stylesheet" type="text/css">
<style>
.province {
	float: left;
	position: relative;
	width: 150px;
	height: 35px;
	line-height: 35px;
	border: 1px solid #fff;
}

.province:hover {
	border: 1px solid #f7e4a5;
	border-bottom: 1px solid #fffec6;
	background: #fffec6;
}

.province .cityall {
	margin-top: 10px;
}

.province ul {
	list-style: outside none none;
	position: absolute;
	padding: 0;
	background: #fffec6;
	border: 1px solid #f7e4a5;
	display: none;
	width: auto;
	width: 300px;
	z-index: 999999;
	left: -26px;
	top: 33px;
}

.province ul li {
	float: left;
	min-width: 60px;
	margin-left: 20px;
	height: 30px;
	line-height: 30px;
}

.province .checkbox-inline {
	padding-top: 0;
}

h3, h4, h5 {
	margin: 5px 0;
	font-weight: 600;
}

input[type=email], input[type=url], input[type=search], input[type=tel],
	input[type=color], input[type=text], input[type=password], input[type=datetime],
	input[type=datetime-local], input[type=date], input[type=month], input[type=time],
	input[type=week], input[type=number], textarea {
	border-radius: 0 !important;
	color: #858585;
	background-color: #FFF;
	border: 1px solid #D5D5D5;
	padding: 5px 4px 6px;
	font-size: 14px;
	font-family: inherit;
	-webkit-box-shadow: none !important;
	box-shadow: none !important;
	-webkit-transition-duration: .1s;
	transition-duration: .1s;
}
.spectable td, .spectable th {
	border: 1px solid #ccc;
	vertical-align: middle;
	text-align: center;
}

.spectable th {
	font-weight: bold;
}

.spectableinput {
	text-align: center;
}

.f {
	border-color: #b94a48;
	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
	-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}

.table.table-bordered tr th, .table.table-bordered tr td {
	overflow: hidden;
	text-overflow: ellipsis;
}
select {
    padding: 3px 4px;
    height: 30px;
}

</style>
<body class="gray-bg">
	<div class="wrapper wrapper-content">
		<div class="row">
			<div class="col-sm-12">
				<div class="form-horizontal m-t">
					<div class="form-group">
						<ul class="nav nav-arrow-next nav-tabs" id="myTab">
							<li ><a href="#tab_basic">活动设置</a></li>
							<li class="active"><a href="#tab_des">商品设置</a></li>
						</ul>
					</div>
					<div class="tab-content" style="border: 0px;">
						<div class="tab-pane " id="tab_basic">
							<div class="form-group">
								<label class="col-sm-2 control-label">活动名称:</label>
								<div class="col-sm-6">
									<input id="displayorder" name="displayorder" placeholder="必填：活动名称"
												 class="form-control" type="text" maxlength="100">
								</div>
								<label class="col-sm-2 control-label" style="text-align: left;color:red;">*活动名称(50个汉字以内)</label>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">开始时间:</label>
								<div class="col-sm-6">
									<input type="text" class=" form-control"
												 id="startTime" name="startTime" placeholder="开始时间"
												 onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
												 style="background-color: #fff;" readonly="readonly"/>
								</div>
								<label class="col-sm-2 control-label" style="text-align: left;color:red;">*开始时间</label>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">结束时间:</label>
								<div class="col-sm-6">
									<input type="text" class=" form-control"
												 id="endTime" name="endTime" placeholder="结束时间"
												 onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
												 style="background-color: #fff;" readonly="readonly"/>
								</div>
								<label class="col-sm-2 control-label" style="text-align: left;color:red;">*结束时间</label>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">适用店铺:</label>
								<div class="col-sm-6">
									<a onclick="alert('选择店铺')">选择店铺</a>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">每人限购:</label>
								<div class="col-sm-2">
									<input id="specTitle" type="number" name="specTitle" class="form-control"
									>
								</div>
								每人可以购买
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">订单取消:</label>
								<div class="col-sm-2">买家</div>
								<div class="col-sm-2">
									<input id="manudate"  type="number"  name="manudate" class="form-control">

								</div>
								<div class="col-sm-4">分钟后未支付订单，订单取消</div>
							</div>

							<div class="form-group text-center">
								<div class="col-sm-8 col-sm-offset-2">
									<button class="btn btn-primary" onclick="nextStep()">
										<i class="fa fa-check"></i>下一步
									</button>
								</div>
							</div>
						</div>
						<!-- 商品选择开始 -->
						<div class="tab-pane active" id="tab_des">
							&nbsp;
							<!--							<div class="form-group">-->
							<!--								<label class="col-xs-12 col-sm-3 col-md-2 control-label">选择商品（只能添加一件商品参与秒杀活动  </label>-->
							<!--								<div class="col-sm-9 col-xs-12">-->
							<!--										<a onclick="chooseProduct()">选择商品</a>-->
							<!--								</div>-->
							<!--							</div>-->
							<div class="form-group text-center">
								<!--								<div class="col-sm-8 col-sm-offset-2">-->
								<!--									<button class="btn btn-primary" onclick="saveProduct()">-->
								<!--										<i class="fa fa-check"></i>提交-->
								<!--									</button>-->
								<!--									<div class="btn btn-danger" onclick="reset()">-->
								<!--										<i class="fa fa-remove"></i> 重置-->
								<!--									</div>-->
								<!--								</div>-->
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<div th:include="centre/manage/include::footer"></div>
	<script type="text/javascript" src="/js/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="/js/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript" src="/js/ueditor/lang/zh-cn/zh-cn.js"></script>
	<script type="text/javascript" src="/js/ueditor/custom.js?v=2"></script>
	<script type="text/javascript" src="/js/appjs/product/AreaData.js"></script>
	<script type="text/javascript" src="/public/ace/js/ace-extra.js"></script>
	<script type="text/javascript" src="/js/plugins/layui/layui.js"></script>
	<script type="text/javascript" src="/js/plugins/layer/layer.js"></script>
	<script type="text/javascript" src="/js/bootstrap.min.js"></script>
    <script src="/js/jquery-select/jquery.searchableSelect.js"></script>
	<script type="text/javascript">

		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
	
		layui.use('laydate', function(){
			  var laydate = layui.laydate;
			  laydate.render({
			  	elem: '#timestart' , type: 'datetime'
			  });
			  
			  laydate.render({
			  	elem: '#timeend' , type: 'datetime'
			  });
			  
			  laydate.render({
				  elem: '#upStartTime' , type: 'datetime'
			  });
			  
			  laydate.render({
				elem: '#upEndTime' , type: 'datetime'
			  });
		 
			  
		})

		function nextStep(){
			console.info("========");
			$('#productSetting').trigger("click");
		}

		/**
		 * 选择商品
		 */
		function chooseProduct(){

			// iframe层
			layer.open({
				id : 'seckill_add',
				type : 2,
				title : '新增秒杀',
				maxmin : true,
				shadeClose : false, // 点击遮罩关闭层
				area: ['90%', '90%'],
				content : prefix + '/toAdd' // iframe的url
			});
		}


		function checkoption() {
	        var full = true;
	        if ($("#hasoption").get(0).checked) {
	            $(".spec_title").each(function (i) {
	                if ($(this).val()=='' || $(this).val()==undefined) {
	            		layer.alert("请输入规格名称!", {icon: 5});
	                    full = false;
	                    return false;
	                }
	            });
	            $(".spec_item_title").each(function (i) {
	                if ($(this).val()=='' || $(this).val()==undefined) {
	            		layer.alert("请输入规格项名称!", {icon: 5});
	                    full = false;
	                    return false;
	                }
	            });
	        }
	        if (!full) {
	            return false;
	        }
	        return full;
	    }


	</script>
	
</body>
</html>
